const router = require('express').Router();
const upload = require("../utils/upload");

router.post("/upload",upload.single('img'),(req,res)=>{
    console.log(req.file);
    let path = '/uploads/'+req.file.filename;
    
    res.send({
        code:0,
        msg:"上传成功",
        data:{
            path
        }
    })
})

module.exports = router